package com.mkait.thief.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName goods_card
 */
@TableName(value ="goods_card")
@Data
public class GoodsCard implements Serializable {
    /**
     * 
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    @TableField(value = "user_id")
    private Integer userId;

    /**
     * 
     */
    @TableField(value = "goods_id")
    private Integer goodsId;

    /**
     * 
     */
    @TableField(value = "number")
    private String number;

    /**
     * 
     */
    @TableField(value = "secret")
    private String secret;

    /**
     * -1删除 0不可用 1可用 2已使用
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 
     */
    @TableField(value = "create_at")
    private Integer createAt;

    /**
     * 删除标记
     */
    @TableField(value = "delete_at")
    private Integer deleteAt;

    /**
     * 售出时间
     */
    @TableField(value = "sell_time")
    private Integer sellTime;

    /**
     * 
     */
    @TableField(value = "is_cross")
    private Integer isCross;

    /**
     * 
     */
    @TableField(value = "is_first")
    private Integer isFirst;

    /**
     * 
     */
    @TableField(value = "unfreeze_at")
    private Integer unfreezeAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        GoodsCard other = (GoodsCard) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
            && (this.getNumber() == null ? other.getNumber() == null : this.getNumber().equals(other.getNumber()))
            && (this.getSecret() == null ? other.getSecret() == null : this.getSecret().equals(other.getSecret()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateAt() == null ? other.getCreateAt() == null : this.getCreateAt().equals(other.getCreateAt()))
            && (this.getDeleteAt() == null ? other.getDeleteAt() == null : this.getDeleteAt().equals(other.getDeleteAt()))
            && (this.getSellTime() == null ? other.getSellTime() == null : this.getSellTime().equals(other.getSellTime()))
            && (this.getIsCross() == null ? other.getIsCross() == null : this.getIsCross().equals(other.getIsCross()))
            && (this.getIsFirst() == null ? other.getIsFirst() == null : this.getIsFirst().equals(other.getIsFirst()))
            && (this.getUnfreezeAt() == null ? other.getUnfreezeAt() == null : this.getUnfreezeAt().equals(other.getUnfreezeAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
        result = prime * result + ((getNumber() == null) ? 0 : getNumber().hashCode());
        result = prime * result + ((getSecret() == null) ? 0 : getSecret().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateAt() == null) ? 0 : getCreateAt().hashCode());
        result = prime * result + ((getDeleteAt() == null) ? 0 : getDeleteAt().hashCode());
        result = prime * result + ((getSellTime() == null) ? 0 : getSellTime().hashCode());
        result = prime * result + ((getIsCross() == null) ? 0 : getIsCross().hashCode());
        result = prime * result + ((getIsFirst() == null) ? 0 : getIsFirst().hashCode());
        result = prime * result + ((getUnfreezeAt() == null) ? 0 : getUnfreezeAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", goodsId=").append(goodsId);
        sb.append(", number=").append(number);
        sb.append(", secret=").append(secret);
        sb.append(", status=").append(status);
        sb.append(", createAt=").append(createAt);
        sb.append(", deleteAt=").append(deleteAt);
        sb.append(", sellTime=").append(sellTime);
        sb.append(", isCross=").append(isCross);
        sb.append(", isFirst=").append(isFirst);
        sb.append(", unfreezeAt=").append(unfreezeAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}